<?php if (!defined('THINK_PATH')) exit();?><!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<meta name="viewport" content="initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0, user-scalable=no">
<title>高级查询</title>
<link rel="stylesheet" href="/Public/App/css/jquery.nstSlider.css">
<link rel="stylesheet" href="/Public/App/css/common.css">
<link rel="stylesheet" href="/Public/App/css/list-filter.css">
<script src="/Public/App/js/jquery-1.12.4.min.js"></script>
<script src="/Public/App/js/jquery.nstSlider.min.js"></script>
<script src="/Public/App/js/list-filter.js"></script>
    <script>
    function jumpUrl()
    {
        url = "/index.php?m=App&c=Index&a=getlist&big=<?php echo ($big); ?>&pa=0&ma=20&or=<?php echo ($or); ?>&ci=<?php echo (session('ci')); ?>&pl=<?php echo (session('mycity')); ?>&br=<?php echo ($br); ?>&se=<?php echo ($se); ?>&pr=<?php echo ($pr); ?>";
        var mo = $("#filtermo").find(".cur");
        if (mo[0]) { 
            url += "&mo=" + mo[0].innerText;
        }
        var ta = $("#filterta").find(".active");
        if (ta[0]) {
            var tainfo = '';
            for (var i = 0; i < ta.length; i++)
            {
                if (tainfo != '')
                    tainfo += ',';
                tainfo += ta[i].innerText;
            }
            url += "&ta=" + tainfo;
        }
        url += "&ag=" + $("#age-cur").attr('value')
            +"&lo=" + $("#mileage-cur").attr('value')
            + "&di=" + $("#engine-cur").attr('value');

        var en = $("#filteren").find(".cur");
        if (en[0]) {
            url += "&en=" + en[0].innerText;
        }
        
        var oi = $("#filteroi").find(".active");
        if (oi[0]) {
            var oiinfo = '';
            for (var i = 0; i < oi.length; i++) {
                if (oiinfo != '')
                    oiinfo += ',';
                oiinfo += oi[i].innerText;
            }
            url += "&oi=" + oiinfo;
        }

        var con = $("#filtercon").find(".cur");
        if (con[0]) {
            var coninfo = '';
            for (var i = 0; i < con.length; i++) {
                if (coninfo != '')
                    coninfo += ',';
                coninfo += con[i].innerText;
            }
            url += "&con=" + coninfo;
        }
        window.location.href = url;
    }
    </script>
</head>
<body>
<!-- header start -->
<header class="header">
	<a class="header-close" href="javascript:history.go(-1);"></a>
	<p class="header-text">筛选</p>
	<a id="reset" class="header-reset" href="javascript:void(0)">重置</a>
</header>
<!-- header end -->

<!-- filter start -->
<p class="filter-title">车型</p>
<ul id="filtermo" class="filter-class clearfix filter-single-select">
	<li><a href="javascript:void(0)" class="<?php if($mo == '两厢轿车' ): ?>cur<?php endif; ?>">两厢轿车</a></li>
	<li><a href="javascript:void(0)" class="<?php if($mo == '三厢轿车' ): ?>cur<?php endif; ?>">三厢轿车</a></li>
	<li><a href="javascript:void(0)" class="<?php if($mo == '跑车' ): ?>cur<?php endif; ?>">跑车</a></li>
	<li><a href="javascript:void(0)" class="<?php if($mo == 'SUV' ): ?>cur<?php endif; ?>">SUV</a></li>
	<li><a href="javascript:void(0)" class="<?php if($mo == 'MPV' ): ?>cur<?php endif; ?>">MPV</a></li>
</ul>
<!--<p class="filter-title">车牌所在地</p>
<ul class="filter-common-list clearfix filter-single-select">
	<li><a href="javascript:void(0)">本地</a></li>
	<li><a href="javascript:void(0)">外地</a></li>
</ul>-->
<p class="filter-title">标签</p>
<ul id="filterta" class="filter-common-list clearfix filter-mult-select">
    <li><a href="javascript:void(0)" class="<?php if(stripos($ta,'练手车') !== false): ?>active<?php endif; ?>">练手车</a></li>
	<li><a href="javascript:void(0)" class="<?php if(stripos($ta,'准新车') !== false): ?>active<?php endif; ?>">准新车</a></li>
    <li><a href="javascript:void(0)" class="<?php if(stripos($ta,'降价急售') !== false): ?>active<?php endif; ?>">降价急售</a></li>
	<li><a href="javascript:void(0)" class="<?php if(stripos($ta,'寄售') !== false): ?>active<?php endif; ?>">寄售</a></li>
    <li><a href="javascript:void(0)" class="<?php if(stripos($ta,'今日超值') !== false): ?>active<?php endif; ?>">今日超值</a></li>
</ul>
<p class="filter-title">变速箱</p>
<ul id="filteren" class="filter-common-list clearfix filter-single-select">
	<li><a href="javascript:void(0)" class="<?php if($en == '手动' ): ?>cur<?php endif; ?>">手动</a></li>
	<li><a href="javascript:void(0)" class="<?php if($en == '自动' ): ?>cur<?php endif; ?>">自动</a></li>
</ul>
<p class="filter-title">车龄要求<span>（单位: 年）</span></p>
<div class="nstSliderWrap">
	<div id="age-slider" class="nstSlider" data-range_min="0" data-range_max="8" data-cur_min="<?php echo ($showagemin); ?>" data-cur_max="<?php echo ($showagemax); ?>">
		 <div id="age-bar" class="bar">
			<p id="age-cur" value="" class="nstSliderLabel"><?php if(!empty($showage)): endif; ?></p>
		 </div>
		 <div id="age-leftGrip" class="leftGrip"></div>
		 <div id="age-rightGrip" class="rightGrip"></div>
	</div>
	<span class="nstSliderZero">0</span>
	<ul class="nstSliderAxis">
		<li></li>
		<li>2</li>
		<li></li>
		<li>4</li>
		<li></li>
		<li>6</li>
		<li></li>
		<li>不限</li>
	</ul>
</div>
<p class="filter-title">行驶里程<span>（单位: 万公里）</span></p>
<div class="nstSliderWrap">
	<div id="mileage-slider" class="nstSlider" data-range_min="0" data-range_max="15" data-cur_min="<?php echo ($showlongmin); ?>" data-cur_max="<?php echo ($showlongmax); ?>">
		 <div id="mileage-bar" class="bar">
			<p id="mileage-cur" value="" class="filter-mileage-cur nstSliderLabel"></p>
		 </div>
		 <div id="mileage-leftGrip" class="leftGrip"></div>
		 <div id="mileage-rightGrip" class="rightGrip"></div>
	</div>
	<span class="nstSliderZero">0</span>
	<ul class="filter-mileage-axis nstSliderAxis">
		<li></li>
		<li>3</li>
		<li></li>
		<li>6</li>
		<li></li>
		<li>9</li>
		<li></li>
		<li>12</li>
		<li></li>
		<li>不限</li>
	</ul>
</div>
<p class="filter-title">排量<span>（单位: 升）</span></p>
<div class="nstSliderWrap">
	<div id="engine-slider" class="nstSlider" data-range_min="0" data-range_max="5" data-cur_min="<?php echo ($showdimin); ?>" data-cur_max="<?php echo ($showdimax); ?>">
		 <div id="engine-bar" class="bar">
			<p id="engine-cur" value="" class="nstSliderLabel"></p>
		 </div>
		 <div id="engine-leftGrip" class="leftGrip"></div>
		 <div id="engine-rightGrip" class="rightGrip"></div>
	</div>
	<span class="nstSliderZero">0</span>
	<ul class="nstSliderAxis">
		<li></li>
		<li>1.0</li>
		<li></li>
		<li>2.0</li>
		<li></li>
		<li>3.0</li>
		<li></li>
		<li>4.0</li>
		<li></li>
		<li>不限</li>
	</ul>
</div>
<p class="filter-title">燃油类型</p>
<ul id="filteroi" class="filter-common-list clearfix filter-mult-select">
	<li><a href="javascript:void(0)" class="<?php if(stripos($oi,'汽油') !== false): ?>active<?php endif; ?>">汽油</a></li>
	<li><a href="javascript:void(0)" class="<?php if(stripos($oi,'柴油') !== false): ?>active<?php endif; ?>">柴油</a></li>
	<li><a href="javascript:void(0)" class="<?php if(stripos($oi,'电动') !== false): ?>active<?php endif; ?>">电动</a></li>
	<li><a href="javascript:void(0)" class="<?php if(stripos($oi,'油电混合') !== false): ?>active<?php endif; ?>">油电混合</a></li>
	<li><a href="javascript:void(0)" class="<?php if(stripos($oi,'其他') !== false): ?>active<?php endif; ?>">其他</a></li>
</ul>
<p class="filter-title">国别</p>
<ul id="filtercon" class="filter-common-list last clearfix filter-single-select">
	<li><a href="javascript:void(0)" class="<?php if($con == '国产' ): ?>cur<?php endif; ?>">国产</a></li>
	<li><a href="javascript:void(0)" class="<?php if($con == '合资' ): ?>cur<?php endif; ?>">合资</a></li>
	<li><a href="javascript:void(0)" class="<?php if($con == '进口' ): ?>cur<?php endif; ?>">进口</a></li>
</ul>
<br><br><br>
<!-- filter end -->
  
<!-- footer start -->
<footer class="list-filter-footer">
	<a href="javascript:jumpUrl();">查看</a>
</footer>
<!-- footer end -->
</body>
</html>